<template>
  <div>
    <h1>添加新闻</h1>
    <p>标题<input type="text" v-model="from.title"></p>
    <p>内容<input type="text" v-model="from.register"></p>
    <button @click="post_jou">添加</button>
  </div>
</template>

<script>
export default {
  name: "add_jou",
  data(){
    return{
      from:{}
    }
  },
  methods:{
    post_jou(){
      this.$axios.post('users/jou/',this.from).then(res=>{
        if(res.data.code==200){
          alert('添加成功')
          this.from={}
        }
      })
    }
  }
}
</script>

<style scoped>

</style>
